function   formatDate(now)   {     
		var unixTimestamp = new Date( now ) ;
		commonTime = unixTimestamp.toLocaleString();   
		return commonTime;
        }

Date.prototype.toLocaleString = function() {
    return this.getFullYear() + "-" + (this.getMonth() + 1) + "-" + this.getDate() + " " + this.getHours() + ":" + this.getMinutes() ;
};